<%@ page language="java" pageEncoding="UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="fp" uri="/fp-tags" %>

<%@ include file="/common/exterior/head.jsp"%>
	
<script type="text/javascript">

	$(document).ready(function() {
		$("#mainForm").validate();
	});

	function clickBtn(action,event,id){
		switch(action){
		case "search":
			  $("#mainForm").attr("action", "search.action");
			  break;

		case "view":
			  popup(event, "search!view.action?infoPublishId="+id, "width:710;height:430;");
			  return;	  

		case "clean":
			  window.location="search.action";
			  return;				  
		}

		$("#mainForm").submit();
	}
</script>
	
<div class="content">  
  <div class="pageTitle">Search Publish information</div>
  <script>menuSelected = "FUN003";</script>
  
  <!-- ----------------Main table ------------START -->
  <table border="0" cellspacing="0" cellpadding="0" style="width:100%">
  <tr>
  
    <!-- The trade tree and area tree  -->
  	<td style="width:203px;height:665px;">
  		<iframe id="areaTradeTreeIframe" name="areaTradeTreeIframe" src="<s:url value='/position'/>/area-trade-tree.action"   style="width: 100%;height: 100%;" scrolling="no" frameborder="0"></iframe>
  	</td>
  	
  	<!-- The perpendicular line  -->
  	<td style="width:10px">&nbsp;</td>
  	
  	<!-- The left window  -->
  	<td valign="top">
		 <div class="form1">
		  <s:form id="mainForm" name="mainForm" action="search.action" method="post">
		  	<s:hidden id="areaId" name="infoPublish.area.id"></s:hidden>
		  	<s:hidden id="tradeId" name="infoPublish.trade.id"></s:hidden>
		  
		    <table border="0" cellspacing="0" cellpadding="0">
			      <tr>
			        <td class="sep" ><img src="../images/spacer.gif" style="width:180px;" /></td>
			        <td class="sep" ><img src="../images/spacer.gif" style="width:180px;" /></td>
			        <td class="sep" ><img src="../images/spacer.gif" style="width:180px;" /></td>
			        <td class="sep" style="width:200px;"><img src="../images/spacer.gif" style="width:200px;" /></td>
			        <td class="sep sep2" ><img src="../images/spacer.gif" /></td>
			      </tr>
			      
		          <tr>
		          	<td colspan="5">
		          		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		          			<tr>
		          				<td class="fLabel" width="60px">地理定位:</td>
		          				<td class="pageTitle5" id="areaName">中国-广东-广州</td>
		          				<td class="fLabel" width="60px">地理微调:</td>
		          				<td>
									<select id="adjustArea" name="adjustAreaId" style="width: 100px;" class="inputSelect">
										<option value="">-- All --</option>
									</select>
								</td>
		          				<td class="fLabel" width="60px">行业定位:</td>
		          				<td class="pageTitle5" id="tradeName">IT-软件-java</td>
		          				<td class="fLabel" width="60px">行业微调:</td>
		          				<td >
									<select id="adjustTrade" name="adjustTradeId" style="width: 100px;" class="inputSelect">
										<option value="">-- All --</option>
									</select>		          				
								</td>		          				
		          			</tr>
		          		</table>
		          	</td>
			      </tr>
			     
			     <tr><td colspan="5">&nbsp;</td></tr> 	
			      			      
			      <tr>
			        <td><label class="fLabel" >发布类型</label>
			          <div class="fField">
				            <s:select cssClass="inputSelect" cssStyle="width:155px" name="infoPublish.type" 
				            		  list="parameterManager.getByCode('PUBLISH_TYPE')" listKey="value" listValue="label"
				            		  headerKey="" headerValue="-- Select --">
				            </s:select>
			          </div></td>
			        <td><label class="fLabel" >标题</label>
			          <div class="fField">
			             <s:textfield name="infoPublish.title" cssStyle="width:150px" />
			          </div></td>
			        <td><label class="fLabel" >发布信息</label>
			          <div class="fField">
			            <s:textfield name="infoPublish.content" cssStyle="width:150px" />
			          </div></td>
			          
			        <td><label class="fLabel" >修改日期From</label>
			          <div class="fField">
			            <s:textfield name="s" cssClass="inputCalendar" cssStyle="width:150px" />
			          </div></td>
			          
			          <td><label class="fLabel" >修改日期To</label>
			          <div class="fField">
			            <s:textfield name="ss" cssClass="inputCalendar" cssStyle="width:150px" />
			          </div></td>
			      </tr>
		
				  <tr><td colspan="5">&nbsp;</td></tr> 	
		        </table>
		        
			    <div class="btnSet btnSetTypeB">
				      <div class="left" >
				        <div class="button" >
				          <div class="left" >
				            <div class="right" >
				              <input class="inputButton" type="button" id="searchBtn" name="search" value="Search" onclick="clickBtn('search');"/>
				            </div>
				          </div>
				        </div>
				        
				        <div class="button" >
				          <div class="left" >
				            <div class="right" >
				              <input class="inputButton" type="button" id="clearBtn" name="clear" value="Clear" onclick="clickBtn('clean');"/>
				            </div>
				          </div>
				        </div>
				        
			      </div>
		      	</div>
		    
				<s:if test="%{page!=null&&page.result!=null&&page.result.size()!=0}">
				   <div class="sList">
				     <table width="100%" cellspacing="0" cellpadding="0" border="0" class="sTable">
				       <tbody><tr>
				         <td class="sTh t">人名</td>
				         <td class="sTh t"><s:text name="COMMON_PUBLISH_TITLE"/></td>
				         <td class="sTh t"><s:text name="COMMON_PUBLISH_PHONE"/></td>
				         <td class="sTh t"><s:text name="COMMON_PUBLISH_TRADE"/></td>
				         <td class="sTh t"><s:text name="COMMON_PUBLISH_ADDRESS"/></td>
				         <td class="sTh t">修改时间</td>
				         <td class="sTh t"><s:property value="%{getText('COMMON_OPERATION')}" escape="true" /></td>
				       </tr>
				       
				       <s:iterator value="page.result" var="publishInfo" status="st">
		      
				       	  <s:set var="trClass" value="'sRow1'"></s:set>
				    	  <s:if test="#st.index%2==0">
				       	 		<s:set var="trClass" value="'sRow2'"></s:set>
					       	 <s:else>
					       	    <s:set var="trClass" value="'sRow1'"></s:set>
					       	 </s:else>
						  </s:if>
						  
					      <tr class="<s:property value="#trClass"/>">
			      
			     			 <td class="sCell"><s:property value="#publishInfo.modifiedBy"/></td>
					         <td class="sCell"><a href="#" onclick="clickBtn('view',event,'<s:property value='#publishInfo.id'/>');"><s:property value="#publishInfo.title"/></a></td>
					         <td class="sCell"><s:property value="#publishInfo.contactWay"/></td>
					         <td class="sCell"><s:property value="#publishInfo.trade.name"/></td>
					         <td class="sCell"><s:property value="#publishInfo.area.name"/></td>
					         <td class="sCell"><s:property value="#publishInfo.modifiedDate"/></td>
					         
					         <td class="sCell buttonCell">
							    <div class="btnSet btnSetTypeB" style="height:5px;">
							       <div class="left" >
								        <div class="button sbtn" >
								          <div class="left" >
								            <div class="right" >
								              <input class="inputButton" type="button" id="clearBtn" name="viewDetail" value="View Detail" onclick="clickBtn('view',event,'<s:property value='#publishInfo.id'/>');"/>
								            </div>
								          </div>
								        </div>
							      </div>
						      	</div>	
					         </td>
				      	 </tr>		       
				       </s:iterator>
				     </tbody>
				     </table>
				   </div>
				   <fp:paging page="page"></fp:paging>
				</s:if> 
			
			</s:form> 
			</div>  	
  	
  	</td>
  </tr>
  </table>
  <!-- ----------------Main table ------------END -->
  

</div>

<%@ include file="/common/exterior/foot.jsp" %>